<style>
.radbtn{
width:20px;
margin-top:10px;
width:5% !important;
}
</style>
<?php echo $this->Html->script("validate");?>
<div class="main-content">
      <div class="left-panel"></div>
      <div class="panel">
           <?php echo $this->element("backend/left_menu");?>         
          <div class="content">
          <div class="title">
            <br />
            <h2 class="t1"><?php echo __("Thêm mới người dùng");?></h2>
          </div>
          <?php echo $this->element("backend/users/add");?>
          <br />
        </div>
      </div>
      <div class="right-panel"></div>
      <!-- main.end -->
    </div>
    <script>
    $("#btnSave").click(function(){
            var  validateUsername   = new validate("UserUsername","userNameError","Ban phai chua nhap gia tri");
            var  validatePwd        = new validate("UserPassword",'pwdError',"This is not empty");
            var  validateEmail      = new validate("UserEmail","emailError","Email not Emtpy"); 
            var  result     = validateUsername.notEmpty();
            var  result2    = validatePwd.notEmpty();
            var  result3    = validateEmail.notEmpty();
            var result4 = false;
            if(result3)
            {
                validateEmail.message = "Email khong dung dinh dang";
                result4    = validateEmail.email();
            }
            
            return result && result2 && result4;
        });
     function resetForm()
     {
        window.location.reload();
     }
    </script>